// 此文件是由模板文件 ".dtpl/page/$rawModuleName.ts.dtpl" 生成的，你可以自行修改模板

import { pagify, MyPage, wxp } from 'base/'

@pagify()
export default class extends MyPage {
  data = {
    tabList: [
      { label: '全部', id: 1, image: 'https://lorempixel.com/45/45' },
      { label: '待付款', id: 2, image: 'https://lorempixel.com/45/45' },
      { label: '配送中', id: 3, image: 'https://lorempixel.com/45/45' },
      { label: '已完成', id: 4, image: 'https://lorempixel.com/45/45' }
    ]
  }

  async onLoad(options: any) {
    this.getUserInfo()
  }

  getUserInfo() {
    const { avatar_url, nickname } = wxp.getStorageSync('userInfo')
    this.setDataSmart({
      avatar: avatar_url,
      name: nickname
    })
  }

  // goOrders(e: any) {
  //   const id = this.app.getData(e, 'id')
  //   wxp.navigateTo({ url: `${this.app.$url.orders.url}?id=${id}` })
  // }
}
